﻿<%@ Page Language="C#" MasterPageFile="~/Login.master" AutoEventWireup="true" CodeFile="ADMonitor.aspx.cs" Inherits="ADMonitor" Title="广告监测 - 我的广告 - G维网" %>
<%@ Register Assembly="WebChart" Namespace="WebChart" TagPrefix="Web" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceMainText" Runat="Server">
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
        <script src="js/highcharts.js" type="text/javascript"></script>

		<script type="text/javascript">

		    var chart;
		    $(document).ready(function() {
		        //隐藏数据
		        $("#x").hide();
		        $("#y").hide();
		        //准备数据
		        var x1 = $("#x").html();
		        var x2 = x1.split(',');
		        var x = { data: [] };
		        $.each(x2, function(itemNo, item) { x.data.push(item); });
		        var y1 = $("#y").html();
		        var y2 = y1.split(',');
		        var y = { data: [] };
		        $.each(y2, function(itemNo, item) { y.data.push(parseFloat(item)); });
		        y.data.pop();
		        //alert(y.data);

		        chart = new Highcharts.Chart({
		            chart: {
		                renderTo: 'container',
		                defaultSeriesType: 'line',
		                marginRight: 30,
		                marginBottom: 25
		            },
		            title: {
		                text: 'Gowll',
		                x: -20 //center
		            },
		            subtitle: {
		                text: '日点击量分析图',
		                x: -20
		            },
		            xAxis: {
		                categories: x.data
		            },
		            yAxis: {
		                title: {
		                    text: 'PV (°Times)'
		                },
		                min: 21000,
		                plotLines: [{
		                    value: 0,
		                    width: 1,
		                    color: '#808080'
}]
		                },
		                tooltip: {
		                    formatter: function() {
		                        return '<b>' + this.x + '</b><br/>' +
								 this.y + ' Times';
		                    }
		                },
		                legend: {
		                    layout: 'vertical',
		                    align: 'right',
		                    verticalAlign: 'top',
		                    x: -10,
		                    y: 100,
		                    borderWidth: 0
		                },
		                series: [{
		                    name: 'wap.gowll.com',
		                    data: y.data
}]
		                });


		            });
				
</script>
<form id="Form1" runat="server">
<div class="mainLeft">
<div class="mainLeftTop"></div>
<div class="mainLeftMiddle" style="position: relative">      
<h1>我的广告监测</h1>
<br />                                        
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GoWLLConnectionString %>"></asp:SqlDataSource>
<asp:Label ID="Label3" runat="server" Visible="False"></asp:Label>
<asp:Label ID="Label4" runat="server" Visible="False"></asp:Label>
    
<table>
<tr>
    <td valign="top" style="font-size:13px;">
        <div style="padding:2px;">
        <span style="margin:10px;">社区：<asp:TextBox ID="TextBox1" runat="server" Width="80px" BorderWidth="1" Height="16"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="查询" Height="20" OnClick="Button1_Click" /></span>
        
        <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click">上一页</asp:LinkButton>
        <asp:LinkButton ID="LinkButton3" runat="server" OnClick="LinkButton3_Click">下一页</asp:LinkButton>
        </div>
    </td>
</tr>
<tr>
    <td valign="top">
         <asp:DataList ID="DataList1" runat="server" CellPadding="2" BorderWidth="1px" 
             BorderColor="#FF6600" BackColor="White"
             ForeColor="#333333" RepeatColumns="8" RepeatDirection="Horizontal" 
             ShowFooter="False" ShowHeader="False" CellSpacing="2"  
             >
             <AlternatingItemStyle BackColor="#EEEEEE" Width="50px" HorizontalAlign="Center"/>
             <ItemStyle Width="50px" HorizontalAlign="Center" BackColor="#EEFF88"/>
             <ItemTemplate>
                 <asp:LinkButton ID="LinkButton1" runat="server" CommandName='<%# Eval("ID") %>' CommandArgument='<%# Eval("URL") %>' OnClick="LinkButton1_Click" Font-Size="11px" ForeColor="#FF8800"><%# Eval("Title") %></asp:LinkButton>
             </ItemTemplate>
         </asp:DataList>
         <br />
      </td>
</tr>
<tr>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:GoWLLConnectionString %>"></asp:SqlDataSource>
		<span id="x"> 
        <asp:Repeater ID="axisx" runat="server">
            <ItemTemplate>
                <%# Eval("Date","{0:d}") %>,
            </ItemTemplate>
        </asp:Repeater>
        
        </span>
        <span id="y"> 
        <asp:Repeater ID="axisy" runat="server">
            <ItemTemplate>
                <%# Eval("PV") %>,
            </ItemTemplate>
        </asp:Repeater>
        
        </span>

<div id="container" style="width: 600px; height: 400px; margin: 0 auto"></div>

</tr>
</table>                            
</div>
<div class="mainLeftBottom"></div>   
</div>                           
<div class="mainRight">
    <asp:FormView ID="FormView1" runat="server"
             CellPadding="2" BorderWidth="1px" 
             BorderColor="#FF6600" BackColor="White"
             ForeColor="#333333" 
             CellSpacing="2"
    
    >
        <ItemTemplate>
            <asp:Label ID="TitleLabel" runat="server" 
                       Font-Size="11px" 
                       ForeColor="#FF8800" 
                       Text='<%# Bind("Title")%>' 
             />
                                <br>
                                </br> 
                                <asp:Label ID="ProfileLabel" runat="server" 
                                           Font-Size="11px"
                                           ForeColor="Black"
                                Text='<%# Bind("Profile") %>' 
                                />
                                <br />
                            </ItemTemplate>
                        </asp:FormView> 
</div>
 
</form>

</asp:Content>